{extend name="public/common"}
{block name="body"}
<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i>
    系统管理
    <span class="c-gray en">&gt;</span>
    财务设置
    <span class="c-gray en">&gt;</span>
    充值支付方案
    {if condition="$id eq ''"}
    <span class="c-gray en">&gt;</span>
    用户支付开关
    <span class="c-gray en">&gt;</span>
   添加支付类型
   {else/}
   <span class="c-gray en">&gt;</span>
    用户支付开关
   <span class="c-gray en">&gt;</span>
    编辑
   {/if}
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>

<div class="page-container">
    <div id="tab-system" class="HuiTab">
        <div class="tabCon">
            <form action="{:url('Paysetting/addPayMethod')}?is_add=1" method="post" enctype="multipart/form-data" class="form form-horizontal" id="form-article-add">
                    <div class="row cl">
                        <label class="form-label col-xs-4 col-sm-2">方案名称：</label>
                        <div class="formControls col-xs-8 col-sm-9">
                            <input type="text" name="name" value="{$detail['name']}" class="input-text" style="width:205px;" required="required" placeholder="请输入账户昵称" >
                        </div>
                    </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">
                        Logo：
                    </label>
                    <div class="formControls col-xs-8 col-sm-9">
                        {if( !empty($detail['logo']) )}
                        <img src="__ATTACHMENT__/{$detail['logo']}"/><br>
                        {/if}
                        <span class="btn-upload form-group">
                            <input class="input-text upload-url" type="text" name="logo"  readonly style="width:205px">
                            <a href="javascript:void();"class="btn btn-primary radius upload-btn">
                                <i class="Hui-iconfont">&#xe642;</i>
                                选择图片
                            </a>
                            <input type="file"  name="logo" class="input-file">
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">顺序：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="seq" value="{$detail['seq']}" class="input-text" style="width:205px;" required="required" placeholder="请输入账户昵称" >
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">返利方案：</label>
                    <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                        <div class="radio-box"  style="padding-left: 0px;">
                            <input name="method" type="radio" id="sex-3" value="0" {$detail.method=='0'?'checked':''}/>
                            <label for="sex-3">金额</label>
                        </div>
                        <div class="radio-box">
                            <input name="method" type="radio" id="sex-4" value="1" {$detail.method=='1'?'checked':''}/>
                            <label for="sex-4">比例</label>
                        </div>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">返利金额：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="number" step="0.01" min="0" max="100000" name="money" value="{$detail['money']}" class="input-text" style="width:205px;" required="required">
                        <span style="color: #6f6f6c">请输入返利金额或比例（比例在0-100间），0为未开启</span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">备注：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="remark" value="{$detail['remark']}" class="input-text" style="width:205px;" placeholder="请输入备注信息" >
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">状态:</label>
                    <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                        <div class="radio-box" style="padding-left: 0px;">
                            <input name="status" type="radio" id="sex-1" value="1" {$detail.status=='1'?'checked':''}/>
                            <label for="sex-1">开</label>
                        </div>
                        <div class="radio-box">
                            <input name="status" type="radio" id="sex-2" value="0" {$detail.status=='0'?'checked':''}/>
                            <label for="sex-2">关</label>
                        </div>
                    </div>
                </div>
                <div class="am-margin" style="margin-top:60px;">
                    <input type="submit" style="margin-left:240px;" class="btn btn-danger radius"  value="确认编辑" />
                    {if( empty($detail['id']) )}
                    <button type="button" onclick="javascript:history.go(-1);" style="margin-left:30px;" class="btn btn-primary radius">返&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;回</button>
                    {/if}
                </div>
                <input type="hidden" name="id" value="{$detail['id']}">
            </form>
        </div>
    </div>

</div>

{/block}
{block name="js"}
<script type="text/javascript" src="__SYSMET__/common.js"></script>
<script type="text/javascript">
    $(function(){

        $("#tab-system").Huitab({
            index:0
        });
    });
</script>
{/block}
